<meta args="config"/>
<form s="nda,datac,valid" s-data="config" id="form">
    <table class="table table-striped table-bordered">
        <tr>
            <td style="width: 100px;">选品库</td>
            <td>
                <select class="form-control" id="source" s-change="sourceChange(this)" s="select"
                        s-valid-error="require()"
                        s-build="S.get('/api/tbk-api/favorites')"
                        s-select="{title: 'favoritesTitle', value: 'favoritesId'}"
                        name="selectionId">
                </select>
            </td>
        </tr>
    </table>
</form>

<script>
    S.getConfig = function () {
        var deferred = $.Deferred();
        $form.validate().done(function() {
            deferred.resolve(Smart.serializeToObject($form.node))
        })
        return deferred;
    }
</script>
